package com.neusoft.databus.sap.config;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.neusoft.databus.sap.filter.UrlFilter;

@Configuration
public class DatabusSapConfiguration {

    @Bean
    public FilterRegistrationBean<UrlFilter> urlFilterRegistrationBean() {
        final FilterRegistrationBean<UrlFilter> registration = new FilterRegistrationBean<>();
        registration.setFilter(new UrlFilter());
        registration.addUrlPatterns("/*");
        registration.setName("UrlFilter");
        registration.setOrder(100);
        return registration;
    }
}
